﻿@{
    Layout = null;
}


<style>
    input::-webkit-outer-spin-button,
    input::-webkit-inner-spin-button {
        -webkit-appearance: none !important;
    }
</style>
<form id="AEForm" role="form">

    <input type="hidden" id="Action" name="Action" value="2" />
    <div class="RowAlgnTop">

        <div class="col-xs-2 col-md-2 text-right">
            <span class="red-600">*</span>
            生码批次：
        </div>
        <div class="col-xs-10 col-md-10">
            @Html.DropDownList("CodeBatch", null, new
       {
           @class = "form-control",
           name = "CodeBatch",
           onchange = "$.MGJ.Recall.ReturnSelectCount(2)"
       })

        </div>

    </div>



    @*<div class="RowAlgnTop">
        <div class="col-xs-2 col-md-2 text-right">
            <span class="red-600">*</span>
            关联产品：
        </div>
        <div class="col-xs-10 col-md-10">
            @Html.DropDownList("ProductId", null, new
       {
           @class = "form-control",
           name = "ProductId"
       })
        </div>

    </div>

    <div class="RowAlgnTop">
        <div class="col-xs-2 col-md-2 text-right">
            <span class="red-600">*</span>
            关联批次：
        </div>
        <div class="col-xs-10 col-md-10">
            @Html.DropDownList("ProductBatchId", null, new
       {
           @class = "form-control",
           name = "ProductBatchId"
       })
        </div>
    </div>*@

    <div class="RowAlgnTop">
        <div class="col-xs-2 col-md-2 text-right">
            <span class="red-600">*</span>
            操作方法：
        </div>
        <div class="col-xs-10 col-md-10">
            <label for="para">
                <input type="radio" id="para" name="RelateType" value="0" onchange="$.MGJ.Recall.RelateTypeChenge(this)" checked />&nbsp;单号
            </label>
            <label for="all">
                <input type="radio" id="all" name="RelateType" value="1" style="margin-left:40px;" onchange="$.MGJ.Recall.RelateTypeChenge(this)" />&nbsp;整批
            </label>
            <!--   <input type="radio" style="margin-left:40px;" />&nbsp;单号/   -->
        </div>
    </div>

    <div id="SectionNum">
        <div class="RowAlgnTop">

          
                <div class="col-xs-2 col-md-2  text-right"><span class="red-600">*</span>物流码：</div>
                <div class="col-xs-10 col-md-10">
                    <textarea  style="width:100%" id="WL_CodeDisable" name="WL_CodeDisable" class="form-control" placeholder="请输入码，用逗号分隔" @*oninput=""*@ />
                </div>
        


            @*<div class=" col-xs-6 col-md-6">
                <div class="col-xs-4 col-md-4  text-right"><span class="red-600">*</span>起始码：</div>
                <div class="col-xs-8 col-md-8">
                    <input type="text" id="StartCode" name="StartCode" class="form-control" placeholder="请输入起始码" oninput="scanf_integral (event)" />
                </div>
            </div>
            <div class=" col-xs-6 col-md-6">
                <div class="col-xs-4 col-md-4  text-right"><span class="red-600">*</span>结束码：</div>
                <div class="col-xs-8 col-md-8">
                    <input type="text" id="EndCode" name="EndCode" class="form-control" placeholder="请输入结束码" oninput="scanf_integral (event)" />
                </div>
            </div>*@
        </div>

        <div class="RowAlgnTop form-group">
                <div class="col-xs-2 col-md-2  text-right">已选数量：</div>
                <div class="col-xs-10 col-md-10">
                    <input type="text" id="RelateCodeNums" name="RelateCodeNums" class="form-control" readonly="readonly" />
                </div>
        </div>





    </div>
    @*<div id="SectionNum2" style="display:none;">
        <div class="RowAlgnTop form-group">
            <div class=" col-xs-6 col-md-6">
                <div class="col-xs-4 col-md-4  text-right">操作数量：</div>
                <div class="col-xs-8 col-md-8">
                    <input type="text" id="RelateCodeNums2" name="RelateCodeNums" class="form-control" readonly="readonly" />
                </div>
            </div>
        </div>
    </div>*@



    <div class="RowAlgnTop form-group">
       
            <div class="col-xs-2 col-md-2  text-right">召回原因：</div>
            <div class="col-xs-10 col-md-10">
                <textarea  id="Remark" name="Remark" class="form-control" placeholder="" @*oninput=""*@ />
            </div>
      
    </div>


</form>


<script>
    //function CodeAmount() {
    //    var StartCode = $("#StartCode").val()
    //    var EndCode = $("#EndCode").val()

    //    if (StartCode != "" && EndCode != "") {
    //        $("#RelateCodeNums").val(parseInt(EndCode) - parseInt(StartCode) + 1)
    //    }
    //}

    ////起始码结束码
    //function scanf_integral() {
    //    var StartCode = $("#StartCode").val();
    //    var EndCode = $("#EndCode").val();
    //    if (StartCode != '' && EndCode != '') {
    //        $("#RelateCodeNums").val(parseInt(EndCode) - parseInt(StartCode) + 1)
    //    }
    //}
    //$("#StartCode,#EndCode").blur(function () {
    //    var start = $("#StartCode").val()
    //    var end = $("#EndCode").val()
    //    if (start != '' && end != '') {
    //        var num = end - start
    //        if (num < 0) {
    //            $.L.msgError('结束码必须大于起始码!');
    //        }
    //    }
    //})




    $(function () {
        $('#AEForm').bootstrapValidator({
            fields: {
                RelateType: {
                    validators: {
                        notEmpty: {
                            message: '方法不能为空'
                        }
                    }
                },
                //StartCode: {
                //    validators: {
                //        notEmpty: {
                //            message: '起始码不能为空'
                //        },
                //        regexp: {
                //            regexp: /^\d+$/,
                //            message: '起始码只能输入数字'
                //        }
                //    }
                //},
                //EndCode: {
                //    validators: {
                //        notEmpty: {
                //            message: '结束码不能为空'
                //        },
                //        regexp: {
                //            regexp: /^\d+$/,
                //            message: '结束码只能输入数字'
                //        }
                //    }
                //},
                CodeBatch: {
                    validators: {
                        notEmpty: {
                            message: '生码批次不能为空'
                        }
                    }
                },
                //ProductId: {
                //    validators: {
                //        notEmpty: {
                //            message: '关联产品不能为空'
                //        }
                //    }
                //},
                //ProductBatchId: {
                //    validators: {
                //        notEmpty: {
                //            message: '关联批次不能为空'
                //        }
                //    }
                //}
            }
        })
    })
</script>